import type { AppRouteModule } from '@/router/types';

import { LAYOUT } from '@/router/constant';

/**
 * 机构管理
 */
const platform: AppRouteModule = {
  path: '/platform',
  name: 'Platform',
  component: LAYOUT,
  redirect: '/platform/dictionary',
  meta: {
    orderNo: 13,
    icon: 'carbon:version',
    title: '平台管理',
  },
  children: [
    {
      path: 'fieldValueManage',
      name: 'FieldValueManage',
      component: () => import('@/views/platform/fieldValueManage/index.vue'),
      meta: {
        title: '字段值管理',
      }
    },
    {
      path: 'dictionary',
      name: 'Dictionary',
      meta: {
        title: '字典管理',
      },
      children: [
        {
          path: 'list',
          name: 'List',
          component: () => import('@/views/platform/dictionary/list/index.vue'),
          meta: {
            title: '字典列表',
          },
        },
        {
          path: 'type',
          name: 'Type',
          component: () => import('@/views/platform/dictionary/type/index.vue'),
          meta: {
            title: '字典分类',
          },
        },
      ],
    },
    {
      path: 'fieldLibrary',
      name: 'FieldLibrary',
      meta: {
        title: '字段库管理',
      },
      children: [
        {
          path: 'field',
          name: 'Field',
          component: () => import('@/views/platform/fieldLibrary/field/index.vue'),
          meta: {
            title: '字段管理',
          },
        },
      ],
    },
  ],
};

export default platform;
